package com.zyz.O_网络编程;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * @author: vick
 * @Date: 2025/4/15
 * @Description:
 * @version: 1.0
 */
public class TestInetAddress {
    public static void main(String[] args) throws UnknownHostException {
        InetAddress localHost = InetAddress.getLocalHost();
        System.out.println(localHost);

        InetAddress byName = InetAddress.getByName("www.baidu.com");
        System.out.println(byName);

    }
}
